#include <iostream>
#include <cstring>
using namespace std;

void plural(char word[20])
{
    int last_letter = word[strlen(word) - 1];
    switch (word[strlen(word) - 1])
    {
    case 's':
    case 'x':
    case 'z':
        strcat(word, "es");
        break;
    case 'h':
        if (word[strlen(word) - 2] == 'c' || word[strlen(word) - 2] == 's')
        {
            strcat(word, "es");
        }
        else
        {
            strcat(word, "s");
        }
        break;
    case 'y':
        if (word[strlen(word) - 2] == 'a' || word[strlen(word) - 2] == 'e' || word[strlen(word) - 2] == 'i' || word[strlen(word) - 2] == 'o' || word[strlen(word) - 2] == 'u')
        {
            strcat(word, "s");
        }
        else
        {
            word[strlen(word) - 1] = 'i';
            strcat(word, "es");
        }
        break;
    default:
        strcat(word, "s");
        break;
    }
}

int main()
{
    char word[20];
    cin >> word;
    plural(word);
    cout << word;
    return 0;
}